<template>
  <div class="subtitle">
    <div class="border" :class="isVisible ? 'subtitle-select' : ''"></div>
    <div class="cir-triangle" v-show="isVisible">
      <i class="triangle triangle-down1"></i>
      <i class="triangle triangle-down2"></i>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: {
    isVisible: {
      type: Boolean,
      default: false,
    },
  },
  methods: {
    meth() {
      this.isVisible = !this.isVisible;
    },
  },
};
</script>

<style scoped>
.border {
  width: 100%;
  height: 70px;
  border-radius: 4px;
  background-color: white;
  border: 2px solid white;
}
.subtitle {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.subtitle-select {
  border: 2px solid #2b6afd;
}

.cir-triangle {
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.triangle {
  display: inline-block;
  font-size: 0;
  overflow: hidden;
}

.triangle:before {
  content: '';
  position: relative;
  display: inline-block;
  border: 15px solid transparent;
}

.triangle-down1 {
  position: relative;
  top: -5px;
  border-bottom-right-radius: 50%;
  border-bottom-left-radius: 50%;
  z-index: 1;
}
.triangle-down1:before {
  top: 1px;
  border-bottom-width: 0;
  border-top-width: 9px;
  border-top-color: white;
}

.triangle-down2 {
  position: relative;
  top: -12px;
  border-bottom-right-radius: 50%;
  border-bottom-left-radius: 50%;
}
.triangle-down2:before {
  top: 1px;
  border-bottom-width: 0;
  border-top-width: 9px;
  border-top-color: #2b6afd;
}
</style>
